Optimal. Leaf size=87 \[ \frac {\left (2 A e^2+C d^2\right ) \tan ^{-1}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )}{2 e^3}-\frac {B \sqrt {d^2-e^2 x^2}}{e^2}-\frac {C x \sqrt {d^2-e^2 x^2}}{2 e^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 87, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {1815, 641, 217, 203} \[ \frac {\left (2 A e^2+C d^2\right ) \tan ^{-1}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )}{2 e^3}-\frac {B \sqrt {d^2-e^2 x^2}}{e^2}-\frac {C x \sqrt {d^2-e^2 x^2}}{2 e^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 217
Rule 641
Rule 1815
Rubi steps
\begin {align*} \int \frac {A+B x+C x^2}{\sqrt {d^2-e^2 x^2}} \, dx &=-\frac {C x \sqrt {d^2-e^2 x^2}}{2 e^2}-\frac {\int \frac {-C d^2-2 A e^2-2 B e^2 x}{\sqrt {d^2-e^2 x^2}} \, dx}{2 e^2}\\ &=-\frac {B \sqrt {d^2-e^2 x^2}}{e^2}-\frac {C x \sqrt {d^2-e^2 x^2}}{2 e^2}-\frac {\left (-C d^2-2 A e^2\right ) \int \frac {1}{\sqrt {d^2-e^2 x^2}} \, dx}{2 e^2}\\ &=-\frac {B \sqrt {d^2-e^2 x^2}}{e^2}-\frac {C x \sqrt {d^2-e^2 x^2}}{2 e^2}-\frac {\left (-C d^2-2 A e^2\right ) \operatorname {Subst}\left (\int \frac {1}{1+e^2 x^2} \, dx,x,\frac {x}{\sqrt {d^2-e^2 x^2}}\right )}{2 e^2}\\ &=-\frac {B \sqrt {d^2-e^2 x^2}}{e^2}-\frac {C x \sqrt {d^2-e^2 x^2}}{2 e^2}+\frac {\left (C d^2+2 A e^2\right ) \tan ^{-1}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )}{2 e^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 67, normalized size = 0.77 \[ \frac {\left (2 A e^2+C d^2\right ) \tan ^{-1}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )-e (2 B+C x) \sqrt {d^2-e^2 x^2}}{2 e^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.64, size = 71, normalized size = 0.82 \[ -\frac {2 \, {\left (C d^{2} + 2 \, A e^{2}\right )} \arctan \left (-\frac {d - \sqrt {-e^{2} x^{2} + d^{2}}}{e x}\right ) + \sqrt {-e^{2} x^{2} + d^{2}} {\left (C e x + 2 \, B e\right )}}{2 \, e^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.34, size = 52, normalized size = 0.60 \[ \frac {1}{2} \, {\left (C d^{2} + 2 \, A e^{2}\right )} \arcsin \left (\frac {x e}{d}\right ) e^{\left (-3\right )} \mathrm {sgn}\relax (d) - \frac {1}{2} \, \sqrt {-x^{2} e^{2} + d^{2}} {\left (C x e^{\left (-2\right )} + 2 \, B e^{\left (-2\right )}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 108, normalized size = 1.24 \[ \frac {A \arctan \left (\frac {\sqrt {e^{2}}\, x}{\sqrt {-e^{2} x^{2}+d^{2}}}\right )}{\sqrt {e^{2}}}+\frac {C \,d^{2} \arctan \left (\frac {\sqrt {e^{2}}\, x}{\sqrt {-e^{2} x^{2}+d^{2}}}\right )}{2 \sqrt {e^{2}}\, e^{2}}-\frac {\sqrt {-e^{2} x^{2}+d^{2}}\, C x}{2 e^{2}}-\frac {\sqrt {-e^{2} x^{2}+d^{2}}\, B}{e^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.99, size = 70, normalized size = 0.80 \[ \frac {C d^{2} \arcsin \left (\frac {e x}{d}\right )}{2 \, e^{3}} + \frac {A \arcsin \left (\frac {e x}{d}\right )}{e} - \frac {\sqrt {-e^{2} x^{2} + d^{2}} C x}{2 \, e^{2}} - \frac {\sqrt {-e^{2} x^{2} + d^{2}} B}{e^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.40, size = 148, normalized size = 1.70 \[ \left \{\begin {array}{cl} \frac {2\,C\,x^3+3\,B\,x^2+6\,A\,x}{6\,\sqrt {d^2}} & \text {\ if\ \ }e=0\\ \frac {A\,\ln \left (x\,\sqrt {-e^2}+\sqrt {d^2-e^2\,x^2}\right )}{\sqrt {-e^2}}-\frac {B\,\sqrt {d^2-e^2\,x^2}}{e^2}-\frac {C\,x\,\sqrt {d^2-e^2\,x^2}}{2\,e^2}-\frac {C\,d^2\,\ln \left (2\,x\,\sqrt {-e^2}+2\,\sqrt {d^2-e^2\,x^2}\right )}{2\,{\left (-e^2\right )}^{3/2}} & \text {\ if\ \ }e\neq 0 \end {array}\right . \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 4.56, size = 262, normalized size = 3.01 \[ A \left (\begin {cases} \frac {\sqrt {\frac {d^{2}}{e^{2}}} \operatorname {asin}{\left (x \sqrt {\frac {e^{2}}{d^{2}}} \right )}}{\sqrt {d^{2}}} & \text {for}\: d^{2} > 0 \wedge e^{2} > 0 \\\frac {\sqrt {- \frac {d^{2}}{e^{2}}} \operatorname {asinh}{\left (x \sqrt {- \frac {e^{2}}{d^{2}}} \right )}}{\sqrt {d^{2}}} & \text {for}\: d^{2} > 0 \wedge e^{2} < 0 \\\frac {\sqrt {\frac {d^{2}}{e^{2}}} \operatorname {acosh}{\left (x \sqrt {\frac {e^{2}}{d^{2}}} \right )}}{\sqrt {- d^{2}}} & \text {for}\: d^{2} < 0 \wedge e^{2} < 0 \end {cases}\right ) + B \left (\begin {cases} \frac {x^{2}}{2 \sqrt {d^{2}}} & \text {for}\: e^{2} = 0 \\- \frac {\sqrt {d^{2} - e^{2} x^{2}}}{e^{2}} & \text {otherwise} \end {cases}\right ) + C \left (\begin {cases} - \frac {i d^{2} \operatorname {acosh}{\left (\frac {e x}{d} \right )}}{2 e^{3}} - \frac {i d x \sqrt {-1 + \frac {e^{2} x^{2}}{d^{2}}}}{2 e^{2}} & \text {for}\: \left |{\frac {e^{2} x^{2}}{d^{2}}}\right | > 1 \\\frac {d^{2} \operatorname {asin}{\left (\frac {e x}{d} \right )}}{2 e^{3}} - \frac {d x}{2 e^{2} \sqrt {1 - \frac {e^{2} x^{2}}{d^{2}}}} + \frac {x^{3}}{2 d \sqrt {1 - \frac {e^{2} x^{2}}{d^{2}}}} & \text {otherwise} \end {cases}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________